#!/bin/sh

set -e

echo "Creating user and group..."

useradd --system \
        --no-create-home \
        --shell /sbin/nologin \
        --comment "MongoDB Exporter" \
        mongodb_exporter

systemctl daemon-reload > dev/null || exit $?

exit 0
